package com.lzt.yijian.mvp.module;

import android.content.Context;

import com.lzt.yijian.api.ProgressSubscriber;
import com.lzt.yijian.api.inter.ObserverOnNextListener;
import com.lzt.yijian.bean.Movie;
import com.lzt.yijian.mvp.base.BaseModel;

public class HomeFragmentModuleImpl extends BaseModel implements HomeFragmentModule {
    @Override
    public void getData(Context context, final ObserverOnNextListener<Movie> observer) {
        getResultOnNext = new ObserverOnNextListener<Movie>() {
            @Override
            public void onNext(Movie movie) {
                observer.onNext(movie);
            }
        };
        apiUtil.getTopMovie(new ProgressSubscriber<Movie>(getResultOnNext, context, false), 0, 100);
    }
}
